__author__ = 'sdjkx'

class ImageBndBox:
    def __init__(self, id, fileId, rowid, labelId, xmin, ymin, xmax, ymax,userId, createTime = None):
        self.id = id
        self.file_id = fileId
        self.row_id = rowid
        self.label_id = labelId
        self.xmin = xmin
        self.ymin = ymin
        self.xmax = xmax
        self.ymax = ymax
        self.createTime = createTime
        self.user_id = userId
        self.changed = False
        self.deleted = False

    def delBox(self):
        self.deleted = True

    def setLableId(self, babelId):
        self.label_id = babelId
        self.changed = True

    def setXMin(self,xmin):
        self.xmin = xmin
        self.changed = True

    def setYMin(self,ymin):
        self.ymin = ymin
        self.changed = True

    def setXMax(self, xmax):
        self.xmax = xmax
        self.changed = True

    def setYMax(self, ymax):
        self.ymax= ymax
        self.changed = True
